<template>
  <div class="cou">
    <van-sticky :offset-top="0">
      <div class="top">
        <p>
          <router-link to="newm">
              <van-icon @click="fun()" name="arrow-left" size="20" />
          </router-link>
        <span class="tit">可用优惠券</span>
        <span class="titf">查看无效券</span>
        </p>
      </div>
      <div class="topt">
        <div class="button">
            <router-link to="drink"><div class="rla">饮品/食品/配送券</div></router-link>
            <router-link to="trend"><div class="rlb">电商潮品券</div></router-link>
        </div>
      </div>
    </van-sticky>
    
      <router-view />
    <van-sticky class="bo2" :offset-top="599">
      <div class="bo">
        <img src="homeimg/my2.png">
      </div>
    </van-sticky>
  </div>
</template>

<script>
export default {
  methods:{
    fun(){
        this.$router.push("/newm");
    }
  },
  mounted(){
    this.$router.push("drink");
  }
};
</script>

<style scoped>
.cou{
  background-color: white;
}
.bo2{
  width: 3.59rem;
  height: 0.68rem;
  margin: auto;
}
.bo{
  width: 3.59rem;
  height: 0.68rem;
  margin: auto;
}
.router-link-active {
  background-color: white;
  color: #7085c6;
  width: 1.76rem;
  height: 0.3rem;
  margin-top: 0.03rem;
  border-radius: 15px;
  line-height: 0.35rem;

}
.rla,.rlb{
  width: 1.76rem;
  height: 0.3rem;
  margin-top: 0.03rem;
  line-height: 0.35rem;
  border-radius: 15px;
  text-align: center;
}
.topt {
  position: relative;
  width: 3.58rem;
  height: 0.45rem;
  margin: auto;
  line-height: 0.45rem;
  border-radius: 15px;

}
.button {
  display: flex;
  justify-content: space-around;
  position: absolute;
  width: 3.58rem;
  height: 0.37rem;
  background-color: #7085c6;
  border-radius: 15px;
}
.top {
background-color: white;
  width: 3.58rem;
  height: 0.5rem;
  left: 0.1rem;
  margin: auto;
 
}
.tit {
  font-size: 0.2rem;
  position: absolute;
  margin-left: 30%;
  top: 0.1rem;

}
.titf {
  position: absolute;
  right: 0.1rem;
  top: 0.13rem;
}
.van-icon {
  height: 0.3rem;
  line-height: 0.3rem;
  top: 0.1rem;

}
</style>